package com.disability_federation.mapper;

import com.disability_federation.pojo.AmountsAccountsCollection;
import lombok.Data;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

/**
 * 残保金征收账目-数据库接口
 */
@Mapper
public interface MapperAmountsAccountsCollection {

    //查询全部残保金征收账目
    //默认时间升序排序
    @Select("select * from amounts_accounts_collection.amounts_accounts_collection order by levy_time")
    List<AmountsAccountsCollection> query();

    //查询全部残保金征收账目
    //时间降序排序
    @Select("select * from amounts_accounts_collection.amounts_accounts_collection order by levy_time desc")
    List<AmountsAccountsCollection> queryDesc();

    //查询全部残保金征收账目
    //企业名称升序排序
    @Select("select * from amounts_accounts_collection.amounts_accounts_collection order by enterprise")
    List<AmountsAccountsCollection> queryEnterpriseAsc();

    //查询全部残保金征收账目
    //企业名称降序排序
    @Select("select * from amounts_accounts_collection.amounts_accounts_collection order by enterprise desc")
    List<AmountsAccountsCollection> queryEnterpriseDesc();

    //根据企业名称查询残保金征收账目
    //默认企业名称升序排序
    List<AmountsAccountsCollection> queryByCondition(String enterprise);

    //根据企业名称查询残保金征收账目
    //企业名称降序排序
    List<AmountsAccountsCollection> queryByConditionDesc(String enterprise);
}
